Skip to content

Fix duplicate _seconds suffix in APM latency metric name#6657

Merged
graytaylor0 merged 1 commit into
opensearch-project:mainfrom
vamsimanohar:fix/apm-latency-metric-duplicate-seconds-suffix
Mar 20, 2026
Merged

Fix duplicate _seconds suffix in APM latency metric name#6657
graytaylor0 merged 1 commit into
opensearch-project:mainfrom
vamsimanohar:fix/apm-latency-metric-duplicate-seconds-suffix

Conversation

@vamsimanohar

Copy link
Copy Markdown
Member

Summary

  • The Prometheus sink automatically appends unit suffixes to metric names (e.g., unit "s"_seconds)
  • The APM service map processor was naming the histogram metric latency_seconds with unit "s", resulting in latency_seconds_seconds when exported to Prometheus
  • Renamed the metric to latency so the final Prometheus metric name is correctly latency_seconds

Test plan

  • Unit tests updated and passing for ApmServiceMapMetricsUtilTest and OTelApmServiceMapProcessorTest

The Prometheus sink appends unit suffixes to metric names (e.g., unit "s"
becomes "_seconds"). The APM service map processor was naming the histogram
metric "latency_seconds" with unit "s", resulting in "latency_seconds_seconds"
when exported to Prometheus. Rename the metric to "latency" so the final
Prometheus metric name is correctly "latency_seconds".

Signed-off-by: Vamsi Manohar <reddyvam@amazon.com>
@ps48

ps48 commented Mar 20, 2026

Copy link
Copy Markdown
Member

Built this change locally and checked the naming change works! Thanks @vamsimanohar @graytaylor0

Before:
Screenshot 2026-03-19 at 9 56 48 AM

After:
Screenshot 2026-03-19 at 4 11 43 PM

@graytaylor0 graytaylor0 merged commit b73188a into opensearch-project:main Mar 20, 2026
71 of 72 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants